package com.smartstate.dataManagement.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smartstate.dataManagement.entity.Alarm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AlarmMapper extends BaseMapper<Alarm> {

    /**
     * 拿到设备id 和 设属性 判断是否关闭报警
     */
    @Update("update alarm set state = '1',remark  = #{remark} , stopTime= #{stopTime} where deviceId = #{deviceId} and attributes =#{attributes} and state = '2'")
    int updateAlarmAttributes(String deviceId,String attributes,String remark,String stopTime);

}
